package com.ntf.games.framework;

import java.awt.Color;

// import com.jogamp.opengl.util.texture.Texture;

//////////////////////
// -
public abstract class GameObject
{
  // ////////////////////
  // -
  // static final double OBJECTSIZE = TileObject.TILESIZE; // / 3; // 0.333f;

  // ////////////
  // - Member Data
  private int      m_iId;
  private int      m_iList;

  // - Object Size
  protected double m_dSize = 0.5d; // GameObject.OBJECTSIZE;

  // - Object Location
  private Vector3d m_v3dOrigin;
  private Vector3d m_v3dVelocity;

  // - Object Color/Texture
  // public Vector3f m_v3fColor;
  public Color     m_color;
  public Color     m_outlinecolor;
  public boolean   m_bHighlight;
  public Vector3d  m_v3fSelected;

  // public Texture m_texture;

  // ////////////////////
  // - // - Parent
  // private TreeNode m_parent

  // ////////////
  // - Member Functions
  // - Constructor
  public GameObject( int id)
  {
    this.m_iId = id;
    this.m_iList = -1;
    this.setOrigin( new Vector3d( 0.0f, 0.0f, 0.0f));
    this.setVelocity( new Vector3d( 0.0f, 0.0f, 0.0f));
    // this.m_v3fColor = new Vector3d();
    this.m_color = Color.magenta;
    this.m_outlinecolor = Color.cyan.darker().darker();
    this.m_v3fSelected = new Vector3d();
    this.m_bHighlight = false;

  }

  // ////////////
  // -
  public int getId()
  {
    return(this.m_iId);
  }

  public int getList()
  {
    return(this.m_iList);
  }

  public void setList( int list)
  {
    this.m_iList = list;
  }

  // ////////////
  // -
  public double getSize()
  {
    return(this.m_dSize);
  }

  // ////////////
  // - Object Position/Origin operators
  // -
  Vector3d getOrigin()
  {
    return(this.m_v3dOrigin);
  }

  // -
  void setOrigin( Vector3d origin)
  {
    this.m_v3dOrigin = origin;
  }

  // -
  void setOriginX( double x)
  {
    this.m_v3dOrigin.x = x;
  }

  // -
  void setOriginY( double y)
  {
    this.m_v3dOrigin.y = y;
  }

  // -
  void setOriginZ( double z)
  {
    this.m_v3dOrigin.z = z;
  }

  // -
  void setOriginXYZ( double x, double y, double z)
  {
    this.m_v3dOrigin.x = x;
    this.m_v3dOrigin.y = y;
    this.m_v3dOrigin.z = z;
  }

  // ////////////
  // - Object Velocity operators
  // -
  public void setVelocity( Vector3d v3dVelocity)
  {
    this.m_v3dVelocity = v3dVelocity;
  }

  public Vector3d getVelocity()
  {
    return(this.m_v3dVelocity);
  }

}
